FROM adoptopenjdk/openjdk8-openj9:x86_64-alpine-jre8u265-b01_openj9-0.21.0
#读取pom配置的路径 maven插件打包镜像专用.
ARG JAR_FILE

ARG JAVA_OPTS="-Xmx512M -Xms512M -Xmn256M -XX:MaxMetaspaceSize=90M -XX:MetaspaceSize=90M"
ENV LANG C.UTF-8
ENV JAVA_OPTS=${JAVA_OPTS}

MAINTAINER xufeng

RUN echo "http://mirrors.aliyun.com/alpine/v3.4/main/" > /etc/apk/repositories \
    && apk --no-cache add tzdata zeromq \
    && ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo 'Asia/Shanghai' > /etc/timezone

RUN mkdir -p /dmp

WORKDIR /dmp

EXPOSE 11000

ADD ${JAR_FILE} ./app.jar

ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
